/**
 * Created by mac on 2018/9/5.
 */
// 局部样式组件
import styled from 'styled-components';
import logoPic from '../../static/logo.png';

export const HeaderWrapper = styled.div`
    height: 58px;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
`;

export const Logo = styled.div`
    width: 100px;
    background: url(${logoPic});
    display: block;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background-size: contain
`;

export const Nav = styled.div`
    width: 900px;
    height: 100%;
    margin: 0 auto;
    padding-right: 120px;
    box-sizing: border-box;
`;

export const NavItem = styled.div`
    &.left {
        float: left;
    }
    &.right {
        float: right;
        color: #969696;
    }
    &.active {
        color: #ea6f5a;
    }
    line-height: 56px;
    padding: 0 15px;
    font-size: 17px;
    color: #333;
`;

export const NavSearchWrapper = styled.div`
    float: left;
    position: relative;
    .iconfont {
        position: absolute;
        right: 5px;
        bottom: 5px;
        width: 30px;
        line-height: 30px;
        border-radius: 15px;
        text-align: center;
        &.focused {
            background: gray
        }
    }
`;

export const SearchContentWrapper = styled.div`
    width: 240px;
    height: 157px;
    position: absolute;
    left: 20px;
    top: 58px;
    border: 1px solid #f0f0f0;
    background: white;
    overflow: hidden;
`;

export const SearchContentTitle = styled.div`
    margin: 10px;
    font-size: 14px;
    color: #969696;
`;
export const SearchContentRefresh = styled.a`
    color: #969696;
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 13px;
    color: #969696;
`;

export const SearchContentList = styled.div`
    width: 240px;
    height: 113px;
    padding 0 10px;
    box-sizing: border-box;
`;

export const SearchContentListItem = styled.div`
    height: 18px;
    line-height: 18px;
    font-size: 12px;
    color: #787878;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline;
    padding: 2px;
    float: left;
    margin: 3px 5px;
`;


export const NavSearch = styled.input.attrs({
    placeholder: '搜索'
})`
    width: 160px;
    height: 38px;
    font-size: 14px;
    border-radius: 19px;
    background: #eee;
    padding: 0 30px 0 20px;
    margin-top: 9px;
    margin-left: 20px;
    box-sizing: border-box;
    border: 1px solid #eee;
    &::placeholder {
        color: #999;
    }
    &.focused {
        width: 240px;
    }
    &.slide-enter {
        transition: all .2s ease-out;
    }
    &.slide-enter-active {
        width: 240px;
    }
    &.slide-exit {
       transition: all .2s ease-out;
    }
    &.slide-exit-active {
       width: 160px;
    }
`;

export const Addition = styled.div`
    position: absolute;
    right: 0;
    top: 0;
    height: 56px;
`;

export const Button = styled.div`
    float: right;
    margin-top: 9px;
    line-height: 38px;
    border-radius: 19px;
    border: 1px solid #ec6149;
    margin-right: 20px;
    padding: 0 20px;
    &.register {
        color: #ea6f5a;
    }
    &.write {
        background: #ea6f5a;
        color: white;
    }
`;